package com.fzb.forum4j.util;

import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ImgFileUtil {

	public static File[] saveHeader(File file){
		try {
			Image src=ImageIO.read(file);
			BufferedImage img=new BufferedImage(50, 50, BufferedImage.SCALE_DEFAULT);
			img.getGraphics().drawImage(src, 100, 100,null);
			ImageIO.write(img, file.getName(), new FileOutputStream(new File("E:/2.jpg")));
			img.flush();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	} 
	public static void main(String[] args) {
		saveHeader(new File(("e:/2013-08-12_225217.jpg")));
	}
}
